package com.dtkavin.service.impl;

import com.dtkavin.dao.UserDao;
import com.dtkavin.pojo.User;
import com.dtkavin.service.IUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by zhangzhiyong on 2016/9/20.
 */
@Service("userService")
public class UserServiceImpl implements IUserService {
    @Resource
    private UserDao userDao;

    public User getUserById(int userId) {
        return userDao.getUserById(userId);
    }

    public List<User> getAllUser() {
        return userDao.selectAll();
    }
}
